﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTreeWidgetItem>
#include "userregister.h"
#include "userlist.h"
#include "attendanceface.h"
#include "attendancelist.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow {
    Q_OBJECT

  public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    void hideAllWidget();  // 隐藏所有页面
    void showAssignWidget(QString objectName);  // 显示指定obejectName页面
  public slots:
    void connectChangeSlot(bool isConnect);
    void recvDataSlot();
  private slots:
    void on_treeWidget_itemClicked(QTreeWidgetItem *item, int column);

  private:
    Ui::MainWindow *ui;
    QList<QWidget *> widgetList;
    UserRegister *userRegister;
    UserList *userList;
    AttendanceFace *attendanceFace;
    AttendanceList *attendanceList;
};

#endif // MAINWINDOW_H
